package de.fhkl.thatsstroke.database;

import java.io.Serializable;

/**
 * Data Transfer Object for videos.
 */
public class Video implements Serializable
{
	private static final long serialVersionUID = 3748081299286704230L;

	/**
	 * Primary key, only valid and unique inside the application context.
	 */
	private long id;

	/**
	 * ID of this video. Valid and unique in the whole system context. Not used
	 * as primary key due to datatype restrictions of the SQLite database.
	 */
	private String videoId;

	/**
	 * Date at which this video was received.
	 */
	private long date;

	/**
	 * Current state of the video rating process. </br> Not loaded -> loading ->
	 * loaded -> viewed -> deleting </br> </br> <strong>Note:</strong>Not all
	 * states are and need to be persisted.
	 */
	private long flag;

	/**
	 * Parts this video consists of.
	 */
	private long parts;

	/**
	 * Progress of the downloading process of a video in parts.
	 */
	private long progress;

	/**
	 *
	 * 
	 * @return primary key
	 */
	public long getId()
	{
		return id;
	}

	/**
	 * 
	 * @param id
	 *            primary key
	 */
	public void setId(long id)
	{
		this.id = id;
	}

	/**
	 * 
	 * @return videoId
	 */
	public String getVideoId()
	{
		return videoId;
	}

	/**
	 * 
	 * @param videoId
	 */
	public void setVideoId(String videoId)
	{
		this.videoId = videoId;
	}

	/**
	 * 
	 * @return date the video was received at as long in milliseconds
	 */
	public long getDate()
	{
		return date;
	}

	/**
	 * 
	 * @param date
	 *            the video was received at as long in milliseconds
	 */
	public void setDate(long date)
	{
		this.date = date;
	}

	/**
	 * 
	 * @return current state of the video rating process
	 */
	public long getFlag()
	{
		return flag;
	}

	/**
	 * 
	 * @param flag
	 *            current state of the video rating process
	 */
	public void setFlag(long flag)
	{
		this.flag = flag;
	}

	/**
	 * 
	 * @return parts this video consists of
	 */
	public long getParts()
	{
		return parts;
	}

	/**
	 * 
	 * @param parts
	 *            this video consists of
	 */
	public void setParts(long parts)
	{
		this.parts = parts;
	}

	/**
	 * 
	 * @return progress of the downloading process of a video in parts
	 */
	public long getProgress()
	{
		return progress;
	}

	/**
	 * 
	 * @param progress
	 *            of the downloading process of a video in parts
	 */
	public void setProgress(long progress)
	{
		this.progress = progress;
	}
}
